package com.lcc.dingtalk.robot.base.exception;

import com.lcc.dingtalk.robot.base.enums.ENLogLevel;
import lombok.NoArgsConstructor;

/**
 * @author lincc
 * @version 1.0 2020/8/14
 * 异常基类
 */
@NoArgsConstructor
public class DingTalkBaseException extends RuntimeException {
    private static final long serialVersionUID = 950336880829073473L;
    protected ENLogLevel level;

    public DingTalkBaseException(String str) {
        super(str);
        this.level = ENLogLevel.ERROR;
    }

    public DingTalkBaseException(Throwable ex) {
        super(ex);
        this.level = ENLogLevel.ERROR;
    }

    public DingTalkBaseException(String str, Throwable ex) {
        super(str, ex);
        this.level = ENLogLevel.ERROR;
    }

    public ENLogLevel getLevel() {
        return this.level;
    }
}
